Implementing Java Compilers Using ReRAGs
نویسندگان
چکیده
Rewritable Reference Attributed Grammars (ReRAGs) is a recently developed compiler-compiler technology based on object-orientation, aspect-orientation, reference attributed grammars, and conditional rewrites. In this paper we describe our experiences from using ReRAGs for implementing Java compilers. We illustrate how the usage of ReRAGs renders a rather compact, yet easy-to-understand and modular compiler specification where code analysis, restructurings, and optimizations can be conveniently described as aspects performing computations and transformations on the abstract syntax tree. Currently, we have implemented two compilers: one that generates C code with real-time support, and one that generates Java bytecode. Both share the same front end. ACM CCS
منابع مشابه
Rewritable Reference Attributed Grammars
This paper presents an object-oriented technique for rewriting abstract syntax trees in order to simplify compilation. The technique, Rewritable Reference Attributed Grammars (ReRAGs), is completely declarative and supports both rewrites and computations by means of attributes. We have implemented ReRAGs in our aspect-oriented compiler compiler tool JastAdd II. Our largest application is a comp...
متن کاملExtensible Compiler Construction
Processing of programs is a core area in computer science. A compiler that translates source text to machine language is the most well-known kind of tool in this area, but there are numerous other kinds of related applications: sourceto-source translators, refactoring tools, reengineering tools, metrics tools, consistency checkers, etc. These tools perform similar analyses and can therefore ben...
متن کاملRewritable Reference Attributed Grammars design, implementation, and applications
This thesis presents an object-oriented technique for rewriting abstract syntax trees in order to simplify compilation. The technique, Rewritable Reference Attributed Grammars (ReRAGs), is completely declarative and supports both rewrites and computations by means of attributes. We have implemented ReRAGs in our aspect-oriented compiler compiler tool JastAdd II. We present the ReRAG formalism, ...
متن کاملRewriting JGrafchart with Rewritable Reference Attribute Grammars
Grafchart is a graphical programming language for sequential control applications. It exists in two versions: the basic version (BV) and the high-level version (HLV). The currently used Grafchart tool, JGrafchart, only supports BV. To enable further research on HLV, it must be supported by JGrafchart. Since HLV is a superset of BV it is desirable to add it as an extension to the current impleme...
متن کاملImplementing Extensible Compilers
New extensions to programming languages are constantly being proposed. But implementing these extensions usually turns out to be a very difficult and expensive task, since conventional compilers often lack extensibility and reusability. In this paper we present some fundamental techniques to implement extensible compilers in an object-oriented language. For being able to implement extensible co...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Nord. J. Comput.
دوره 11 شماره
صفحات -
تاریخ انتشار 2004